home *** CD-ROM | disk | FTP | other *** search
- #include <string.h>
-
- /************************************************************************/
-
- #undef strspn
-
- size_t strspn(const char *s1, const char *s2)
-
- {
- size_t i;
- const unsigned char *c1=s1;
- const unsigned char *c2;
-
- for(i=0;;i++)
- {
- c2=s2;
- while(*c2!='\0'&&c1[i]!=*c2)
- {
- c2++;
- }
- if(*c2=='\0')
- {
- return i;
- }
- }
- }
-